core: Make OSTREE_TIMESTAMP public API
authorColin Walters <walters@verbum.org>
Thu, 8 Sep 2016 20:50:35 +0000 (16:50 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 9 Sep 2016 00:10:21 +0000 (00:10 +0000)
This way e.g. flatpak can detect which timestamp it should use.
See `flatpak/common/flatpak-utils.c:flatpak_zero_mtime`.

Closes: #501
Approved by: cgwalters

src/libostree/ostree-core.h
src/libostree/ostree-repo-private.h

index d1f76cf17b3fd036611e02c81e24c03785355673..a3419949cf276e1898da56bfb40dbba01427e0e1 100644 (file)
@@ -165,6 +165,15 @@ typedef enum {
 #define OSTREE_SUMMARY_SIG_GVARIANT_STRING "a{sv}"
 #define OSTREE_SUMMARY_SIG_GVARIANT_FORMAT G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING)
 
+/**
+ * OSTREE_TIMESTAMP:
+ *
+ * The mtime used for stored files.  This was originally 0, changed to 1 for
+ * a few releases, then was reverted due to regressions it introduced from
+ * users who had been using zero before.
+ */
+#define OSTREE_TIMESTAMP (0)
+
 /**
  * OstreeRepoMode:
  * @OSTREE_REPO_MODE_BARE: Files are stored as themselves; checkouts are hardlinks; can only be written as root
index e8d5550f5411c96b6b56646b2be1c822a20a3493..6b25a6fc48da2eeb520d5783affe4b827814d77f 100644 (file)
@@ -32,8 +32,6 @@ G_BEGIN_DECLS
 #define _OSTREE_SUMMARY_CACHE_DIR "summaries"
 #define _OSTREE_CACHE_DIR "cache"
 
-#define OSTREE_TIMESTAMP (0)
-
 typedef enum {
   OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0)
 } OstreeRepoTestErrorFlags;